from flask import Flask
from flask import Response

flask_app = Flask(__name__)

@flask_app.route('/hello')
def hello_world():
    return Response(
        'hello',
        mimetype='text/plain'
    )

app = flask_app # 调用Flask暴露的wsgi_app,提供给wsgi server作为application，而不是直接run(port)